#include <iostream>

using namespace std;

int main()
{
    long long n = 0;
    cin >> n;
    n %= 998244353;
    cout << n * n % 998244353 << endl;
    return 0;
}